#!/bin/bash
set -e
cd $(dirname $0)/..

if [[ "$LABEL" = "" ]]; then
  LABEL=etcd
fi

test-load() {
    for i in {1..4}; do
        python3 hack/loadmap.py &
    done
    wait
    python3 hack/histogram.py --backend-name "$LABEL" | awk '{print "[PERF]\t" $0}'
}

echo "Running configmap load generation script"
test-load
